<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html> 
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]--> 
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]--> 
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]--> 
<!-- BEGIN HEAD --> 
<head> 
	<title>投票系统 - Bone</title>
	<meta content="width=device-width, initial-scale=1.0" name="viewport" /> 
	<%@ include file="/common/css.jsp"%>
	<link href="${ctx}/resource/css/promo.css" rel="stylesheet" type="text/css"/> 
	<link href="${ctx}/resource/css/animate.css" rel="stylesheet" type="text/css"/> 
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed page-full-width">
	<!-- BEGIN HEADER -->
	<%@ include file="/common/header.jsp"%>

	<!-- END HEADER -->
	<!-- BEGIN CONTAINER -->
	<div class="page-container row-fluid">
		<!-- BEGIN PAGE -->
		<div class="page-content no-min-height">
			<!-- BEGIN PAGE CONTAINER-->
			<div class="container-fluid promo-page">
				<!-- BEGIN PAGE CONTENT-->
				<div class="row-fluid">
					<div class="span12">
						<div class="block-grey">
							<div class="container-fluid">
								<div id="promo_carousel" class="carousel slide">
									<div class="carousel-inner" style="height: 292px;">

										<div class="active item">
											<div class="row-fluid">
												<div class="span2"></div>
												<div class="span4 margin-bottom-20 margin-top-20 animated rotateInUpRight">
													<h1>欢迎光临 <br>VOTE <font color="#D84A38">SYSTEM</font></h1>
													<p>趣味投票是将时下人们感兴趣的一些话题列举出来并发起投票</p>
													<!-- <p>Lunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut non libero consectetur adipiscing elit magna. Sed et quam lacus. Fusce condimentum eleifend enim a feugiat.</p> -->
													<a href="${ctx}/vote/createPage.do" class="btn red big xlarge">
													新建投票
													<i class="icon-file-alt m-icon-white"></i>
													</a>
													<a href="${ctx}/vote/myList.do?uid=${sessionScope.LOGINED_USER.uid}&select_search=0" class="btn green big xlarge">
													我的投票
													<i class="icon-book m-icon-white"></i>
													</a>
												</div>
												<div class="span4 animated rotateInDownLeft">
													<a href="${ctx}/vote/index.do"><img src="${ctx}/resource/image/img12.jpg" alt=""></a>
												</div> 
												
											</div>
										</div>

										<div class="item">
											<div class="row-fluid">
												<div class="span2"></div>
												<div class="span4 animated rotateInUpRight">
													<a href="${ctx}/vote/index.do"><img src="${ctx}/resource/image/img11.jpg" alt=""></a>
												</div>
												<div class="span4 margin-bottom-20 margin-top-20 animated rotateInUpLeft">
													<h1>VOTE <font color="#D84A38">SYSTEM</font></h1>
													<p>整合各类评选活动的资料和信息,集评选,资讯,榜单和排行于一体的综合性在线网络投票平台,给评选提供一个共同提高的一个交流平台。</p>
													<p>倾听评选声音,满足评选需求。</p>
													<a href="${ctx}/vote/createPage.do" class="btn red big xlarge">
														新建投票
														<i class="icon-file-alt m-icon-white"></i>
													</a>
													<a href="${ctx}/vote/myList.do?uid=${sessionScope.LOGINED_USER.uid}&select_search=0" class="btn green big xlarge">
														我的投票
														<i class="icon-book m-icon-white"></i>
													</a>
												</div>
												<div class="span2"></div>
											</div>
										</div>
									</div>
									<a class="carousel-control left" href="#promo_carousel" data-slide="prev">
									<i class="m-icon-big-swapleft m-icon-white"></i>
									</a>
									<a class="carousel-control right" href="#promo_carousel" data-slide="next">
									<i class="m-icon-big-swapright m-icon-white"></i>
									</a>
								</div>
							</div>
						</div>
						<form action="" id="searchForm" method="post">
						<div class="row-fluid " style="margin-top:40px">
							<div class="span2"></div>
							<div class="span8">
								<div class="controls">
									<input class="span6 m-wrap" name="title_search" id="inputSuccess" type="text" >
									<span class="btn search" id="search_btn">搜 索</span>
								</div>
							</div>
						</div>
						</form>
						<div class="row-fluid " style="margin-top:20px">
							 
							<div class="span2"></div>
							<div class="span4">
								<!-- BEGIN SAMPLE TABLE PORTLET-->
								<div class="portlet box red">
									<div class="portlet-title">
										<div class="caption"><i class="icon-cogs"></i>最新投票</div>
										<div class="tools">
											<a href="javascript:;" class="collapse"></a>
										</div>
									</div>
									<div class="portlet-body">
										<table class="table table-hover" >
											<thead>
											<tr >
												<th style="text-align: center;min-width:30px">编号</th>
												<th>投票主题</th>
												<th>投票范围</th>
												<th style="text-align:center;">创建时间</th>
											</tr>
											</thead>
											<tbody>
											<c:forEach items="${topicList}" var="topic"  varStatus="status">
											<tr>
												<td style="text-align:center;">${status.index+1}</td>
												<td title=" <vs:escape value='${topic.title}'	/> ">
													<a href="${ctx}/vote/router/route.do?topicId=${topic.tid}"  >
														<c:choose>  
														    <c:when test="${fn:length(topic.title) > 10}">  
														        <vs:escape value="${fn:substring(topic.title, 0, 10)}..."	/> 
														    </c:when>  
														   <c:otherwise>  
														         <vs:escape value="${topic.title}"	/> 
														    </c:otherwise>  
														</c:choose>  
													</a>
												</td>
												<td>
													<vs:escape value="${topic.scope==1?'仅会员可投':'所有人可投'}" />
												</td>
												<td style="text-align:center;"><fmt:formatDate value="${topic.createTime}" type="both"/>  </td>
											</tr>
											</c:forEach>
											</tbody>
										</table>
									</div>
								</div>
								<!-- END SAMPLE TABLE PORTLET-->
							</div>
							<div class="span4">
								<!-- BEGIN SAMPLE TABLE PORTLET-->
								<div class="portlet box green">
									<div class="portlet-title">
										<div class="caption"><i class="icon-cogs"></i>最热投票</div>
										<div class="tools">
											<a href="javascript:;" class="collapse"></a>
										</div>
									</div>
									<div class="portlet-body">
										<table class="table table-hover">
											<thead>
											<tr>
												<th style="text-align: center;min-width:60px">编号</th>
												<th>投票主题</th>
												<th>投票范围</th>
												<th style="text-align: center">投票热度</th>
											</tr>
											</thead>
											<tbody>
											<c:forEach items="${listVhd}" var="topic"  varStatus="status">
											<tr>
												<td style="text-align: center">${status.index+1}</td>
												<td title=" <vs:escape value='${topic.title}'	/> ">
													<a href="${ctx}/vote/router/route.do?topicId=${topic.tid}"  >
														<c:choose>  
														    <c:when test="${fn:length(topic.title) > 10}">  
														        <vs:escape value="${fn:substring(topic.title, 0, 10)}..."	/> 
														    </c:when>  
														   <c:otherwise>  
														         <vs:escape value="${topic.title}"	/> 
														    </c:otherwise>  
														</c:choose>  
													</a>
												</td>
												<td>
													<vs:escape value="${topic.scope==1?'仅会员可投':'所有人可投'}" />
												</td>
												<td style="text-align: center">${topic.cnt}</td>
											</tr>
											</c:forEach>
											</tbody>
										</table>
									</div>
								</div>
								<!-- END SAMPLE TABLE PORTLET-->
							</div>
					</div>
				</div>
			</div>
			<!-- END PAGE CONTENT-->
		</div>
		</div>
		<!-- END PAGE CONTAINER-->
	</div>
	<!-- END PAGE -->
	<!-- END CONTAINER -->
	
	<!-- BEGIN FOOTER1 -->
	<%@ include file="/common/footer.jsp"%>
	<!-- END FOOTER -->
	
	<!-- BEGIN JAVASCRIPTS -->
	<%@ include file="/common/js.jsp"%>
	<script src="${ctx}/resource/js/app.js"></script>
	<script>
		jQuery(document).ready(function() {
		   App.init();
		   jQuery('#promo_carousel').carousel({
		      interval: 10000,
		      pause: 'hover'
		   });
		   
		   $("#search_btn").click(function(){
		   	 var searchVal=$("#inputSuccess").val();	
		   	 $("#inputSuccess").val($.trim(searchVal));   
		  	 $("#searchForm").attr("action","${ctx}/vote/list.do");
		  	  $("#searchForm").submit();
		   });
		});
	</script>
	<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>